package com.jar.exercise.设计模式.工厂.抽象工厂;

import com.jar.exercise.设计模式.工厂.抽象工厂.factory.DellFactory;
import com.jar.exercise.设计模式.工厂.抽象工厂.factory.MacFactory;
import com.jar.exercise.设计模式.工厂.抽象工厂.factory.ProductFactory;
import com.jar.exercise.设计模式.工厂.抽象工厂.pojo.abs.Product;

public class Client {
    public static void main(String[] args) {
        ProductFactory dellFactory = new DellFactory();
        Product keyboard = dellFactory.createKeyboard();
        Product monitor = dellFactory.createMonitor();
        Product mouse = dellFactory.createMouse();
        keyboard.printInformation();
        monitor.printInformation();
        mouse.printInformation();
        System.out.println("---------------------------------\n");
        ProductFactory macFactory = new MacFactory();
        Product macKeyboard = macFactory.createKeyboard();
        Product macMonitor = macFactory.createMonitor();
        Product macMouse = macFactory.createMouse();
        macKeyboard.printInformation();
        macMonitor.printInformation();
        macMouse.printInformation();
    }
}
